// 近一周的时间
import { dateFromatStamp } from './convserTime'

export default function () {
  const nearlyWeek = []
  let time = Date.now()
  // 这里从大往小减，就得到了时间从小到大的数组
  for (let i = 6; i >= 0; i--) {
    nearlyWeek.unshift(dateFromatStamp(time, 'MM-DD'))
    // 减去一天的时间戳
    time -= 86400000
  }
  return nearlyWeek
}
